package cn.com.huzo.model.entities.tech;

import com.fasterxml.jackson.annotation.JsonFormat;
import huzofw.model.entities.BaseEntity;
import huzofw.model.entities.IAggregateRoot;
import java.io.Serializable;
import java.sql.Timestamp;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * EBOM主记录实体类
 *
 * @author 吴旭
 */
public class ProductBomHeaderEntity extends BaseEntity implements Serializable, IAggregateRoot {

    private static final long serialVersionUID = -46807358102280773L;
    private Long HeaderId;
    private String StyleNo;                    // 产品款号
    private String ProductName;                // 品名
    private String DesignNo;                   // 设计号
    private String SerialNo;                   // 系列号
    private Timestamp DeliveryDate;            // 交期
    private String CustomerName;               // 客户名称
    private String IcLabDipIndication;         // IC色样指示
    private String EmbroideryLaceAndOther;     // 刺绣花边及其他物品单耗
    private Long DesignedBy;                   // 设计者
    private String DesignedByName;
    private Long BillVersionTypeId;            // 单据操作类型（新品·追单·有变更）
    private String BillVersionTypeName;
    private String Description;                // 备注

    public Long getHeaderId() {
        return HeaderId;
    }

    public void setHeaderId(Long HeaderId) {
        this.HeaderId = HeaderId;
    }

    public String getStyleNo() {
        return StyleNo;
    }

    public void setStyleNo(String StyleNo) {
        this.StyleNo = StyleNo;
    }

    public String getProductName() {
        return ProductName;
    }

    public void setProductName(String ProductName) {
        this.ProductName = ProductName;
    }

    public String getDesignNo() {
        return DesignNo;
    }

    public void setDesignNo(String DesignNo) {
        this.DesignNo = DesignNo;
    }

    public String getSerialNo() {
        return SerialNo;
    }

    public void setSerialNo(String SerialNo) {
        this.SerialNo = SerialNo;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Timestamp getDeliveryDate() {
        return DeliveryDate;
    }

    public void setDeliveryDate(Timestamp DeliveryDate) {
        this.DeliveryDate = DeliveryDate;
    }

    public String getCustomerName() {
        return CustomerName;
    }

    public void setCustomerName(String CustomerName) {
        this.CustomerName = CustomerName;
    }

    public String getIcLabDipIndication() {
        return IcLabDipIndication;
    }

    public void setIcLabDipIndication(String IcLabDipIndication) {
        this.IcLabDipIndication = IcLabDipIndication;
    }

    public String getEmbroideryLaceAndOther() {
        return EmbroideryLaceAndOther;
    }

    public void setEmbroideryLaceAndOther(String EmbroideryLaceAndOther) {
        this.EmbroideryLaceAndOther = EmbroideryLaceAndOther;
    }

    public Long getDesignedBy() {
        return DesignedBy;
    }

    public void setDesignedBy(Long DesignedBy) {
        this.DesignedBy = DesignedBy;
    }

    public String getDesignedByName() {
        return DesignedByName;
    }

    public void setDesignedByName(String DesignedByName) {
        this.DesignedByName = DesignedByName;
    }

    public Long getBillVersionTypeId() {
        return BillVersionTypeId;
    }

    public void setBillVersionTypeId(Long BillVersionTypeId) {
        this.BillVersionTypeId = BillVersionTypeId;
    }

    public String getBillVersionTypeName() {
        return BillVersionTypeName;
    }

    public void setBillVersionTypeName(String BillVersionTypeName) {
        this.BillVersionTypeName = BillVersionTypeName;
    }

    public String getDescription() {
        return Description;
    }

    public void setDescription(String Description) {
        this.Description = Description;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof ProductBomHeaderEntity)) {
            return false;
        }

        final ProductBomHeaderEntity that = (ProductBomHeaderEntity) o;

        return new EqualsBuilder()
                .append(this.getHeaderId(), that.getHeaderId())
                .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + getHeaderId().hashCode();

        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
